<?php
require_once 'Zend/Acl.php';

class Somi_Acl_Acl extends Zend_Acl{
	
	public function __construct()
	{
		
		//adding resources
		#$this->add(new Zend_Acl_Resource('Index'));
		#$this->add(new Zend_Acl_Resource('Index.index'),'Index');
		$this->add(new Zend_Acl_Resource('index'));
		$this->add(new Zend_Acl_Resource('auth'));
		$this->add(new Zend_Acl_Resource('error'));

		
		//adding roles
		$this->addRole(new Zend_Acl_Role('Visitor'));
		$this->addRole(new Zend_Acl_Role('Inaktiv'),'Visitor');
		$this->addRole(new Zend_Acl_Role('Kunden'),'Inaktiv');
		#$this->addRole(new Zend_Acl_Role('Kontakt'),'Geloescht');
		#$this->addRole(new Zend_Acl_Role('Gast'),'Kontakt');
		#$this->addRole(new Zend_Acl_Role('Operator'),'Gast');
		$this->addRole(new Zend_Acl_Role('Admin'));
		#$this->addRole(new Zend_Acl_Role('Administrator'));
		
		//adding rules Visitor
		$this->allow('Visitor','index');
		//$this->allow('Visitor','default.index',array('index'));
		$this->allow('Visitor','auth');
		
		//adding rules Inaktiv
		#$this->allow('Inaktiv','index',array('index'));
		#$this->allow('Inaktiv','auth',array('login','logout','index'));
		
		//adding rules Kunden
		#$this->allow('Kunden','index');
		#$this->allow('Kunden','auth');
		#$this->allow('Kunden','auth',array('login','logout','index'));
		
		$this->allow('Kunden','index');
		
		#$this->allow('Kunden');
		
		//adding rules admin
		$this->allow('Admin');
	
	
	}
}

?>